home *** CD-ROM | disk | FTP | other *** search
- GENERAL
-
- These files represent extensive small changes to the files XC.C and
- XC.EXE, which is a C source lister and cross-reference program which I have
- used intensively. To get instructions, enter xc with no command line
- arguments.
-
- I hope that the command line is no longer sensitive to the position of
- the switches. It accepts file output in either the form -o<filename> or the
- form -o <filename>. The default extension for the input file is .c.
-
- TABS
-
- You can change the tab setting by a -t switch which has the form either
- -t<increment> or -t <increment>. As compiled, the default is 3, which is a
- change in the 8 of the original version to match the default tab setting of
- BRIEF. To change the default, change the constant TAB_DFLT at the beginning
- of XC.C.
-
- INCLUDING FILES (-i and -in)
-
- I compiled the program under Lattice C, Version 3.0 for use with that
- compiler. The compiler accepts an environment variable "INCLUDE=" to give
- paths for #include files, and has a variant file opening function fopene.
- fopene first looks in the default directory for its file. If it doesn't
- find it there, it looks for an environment variable which is the same as
- the file extension. If it finds one, it uses its paths as new directories
- to try. I don't know whether this feature is implemented in the compiler;
- it may well be, but the documentation doesn't mention it. If fopene still
- has not opened the file, it then looks for one specified environment
- variable, which is INCLUDE in our case, and uses its paths as new directories
- to try. With the compiled version in this file, -i on the command line
- uses fopene to open include files. If you want to include only files in the
- current directory, use -in on the command line.
-
- PRINTER STRINGS
-
- There are four preprocessor printer variables, GEMIN10X, EPSONMX,
- EPSONFX and IDSPRISM. Set only one of these to 1 to specify the compressed
- print initial and ending strings for the -c option. The code which they
- control is at the end of the "DEFINITIONS AND VARIABLES" section, just before
- the "MAIN PROGRAM" section. The compiled version of this file has EPSONFX
- set to 1. As compiled, this program sends the printer code for "Double
- strike compressed" at the start and code for "Emphasized pica" at the end.
-
- LATTICE C, VERSION 3 notes
-
- I compiled XC under the small memory model, which allows 64K for data,
- stack and dynamic variables. Since XC is quite a large module, I used it to
- check whether this was adequate space for its tables, which are dynamic. It
- used only about 18K of the 64K available. Based on that one measurement, I
- do not feel that it is worth while going to a small program, large data space
- model.
-
- For a long time, some versions of the program would hang up my computer
- rather than terminate, and other versions would not release their memory. I
- think I corrected the problem by using the allmem and rstmem functions.
- Before I made this change, I found consistently bad results with the default
- compiler alignment. When I used the -w compiler switch to align on word
- boundaries, many of these problems were cured. While I have not tested
- default compilation since, I suggest that if you recompile, you use the -w
- switch.
-
- OTHER COMPILERS
-
- As I read the documentation, Philip Hisley wrote XC.C in BDS C. WHR
- converted it to Computer Innovations C-86 and did not leave any of the old
- code in. He later converted it to Microsoft C, Ver. 1.04, which was the
- same as Lattice C at that time. R.S. White apparently modified it for
- Lattice C, Version 2.0. I have tried to keep the two earlier programs
- and to allow for other compilers by putting what I believe is all compiler
- specific code in a section near the beginning and at the end of the program.
- Use them by changing the preprocessor variables CIC86, LATTICE2 and LATTICE3
- which are near the beginning of the program. Only one of these variables
- should be positive.
-
- I have made enough changes so that I may have hurt some code for earlier
- compilers. In addition, the preprocessor switching logic may be faulty for
- them. Since I have neither Lattice C, Version 2 nor Computer
- Innovations C-86 available, I can not test these versions.
-
- DISCLAIMER
-
- I am not responsible for any harm this program causes anyone.
-
- Lew Paper
- 2230 Midland Grove Road, Apt. 302
- Roseville, MN 55113
- (612) 636-6506
-
- Lew can be found on Terrapin Station BBS, 612/623-0152 2400/1200.
- A BBS for programmers and other techies.